<?php
/* @var $this CustomergroupController */
/* @var $model Customergroup */

$this->breadcrumbs=array(
	'Customergroups'=>array('index'),
	'Create',
);

$this->menu=array(
	array('label'=>'List Customergroup', 'url'=>array('index')),
	array('label'=>'Manage Customergroup', 'url'=>array('admin')),
);
?>

<?php
$cs = Yii::app ()->clientScript;
$cs->registerScript('#yw2',
"
		$(document).ready(function(){
 		   $('#main-nav .nav-top-item').eq(0).removeClass('current');
		   $('#yw0').css(\"display\",\"none\");
		   $('#yw1').css(\"display\",\"block\");
		   $('#main-nav .nav-top-item').eq(1).addClass('current');
		   $('#yw1 li').eq(0).addClass('current');
		});
"
);
?>

<div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h3>管理客户分组</h3>
        <ul class="content-box-tabs">
          <li><a href="<?php echo $this->createUrl('/backend/customergroup')?>">客户分组列表</a></li>
          <li><a  class="default-tab current" href="<?php echo $this->createUrl('/backend/addcustomergroup')?>">增加客户分组</a></li>
        </ul>
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      <div class="content-box-content">
        <div class="tab-content" id="tab1">
        <fieldset></fieldset>        
		</div>

        <div class="tab-content default-tab current" id="tab2">         
            <fieldset>

			<?php $form=$this->beginWidget('CActiveForm', array(
				'id'=>'customergroup-form',
				'enableAjaxValidation'=>false,
			)); ?>
						
				<?php echo $form->errorSummary($model); ?>
			
				<div class="row">
					<?php echo $form->labelEx($model,'group_name'); ?>
					<?php echo $form->textField($model,'group_name',array('class' => 'text-input small-input')); ?>
					<?php echo $form->error($model,'group_name'); ?>
				</div>
			
				<div class="row">
					<?php echo $form->labelEx($model,'display_name'); ?>
					<?php echo $form->textField($model,'display_name',array('class' => 'text-input small-input')); ?>
					<?php echo $form->error($model,'display_name'); ?>
				</div>
				
				<div class="row">
					<?php echo $form->labelEx($model,'group_role'); ?>
					<?php echo $form->textField($model,'group_role',array('class' => 'text-input small-input')); ?>
					<?php echo $form->error($model,'group_role'); ?>
				</div>
	
			
				<div class="row">
					<?php echo $form->labelEx($model,'group_description'); ?>
					<?php echo $form->textArea($model,'group_description',array('rows'=>6, 'cols'=>50)); ?>
					<?php echo $form->error($model,'group_description'); ?>
				</div>
			
				<div class="row buttons">
					<?php echo CHtml::submitButton('增加'); ?>
				</div>
			
			<?php $this->endWidget(); ?>
            </fieldset>
            <div class="clear"></div>
            <!-- End .clear -->          
        </div>
        <!-- End #tab2 -->
      </div>
      <!-- End .content-box-content -->
    </div>
    <!-- End .content-box -->